$(function() {
	$("#save").bind("click", function() {
		var passwdResult = checkPasswd($("#passwd").val());
		if (!passwdResult.result) {
			$.alert(passwdResult.msg);
			return false;
		}
		var repasswdResult = checkRePasswd($("#passwd").val(), $("#repasswd").val());
		if (!repasswdResult.result) {
			$.alert(repasswdResult.msg);
			return false;
		}
		$.showLoading();
		$.ajax({
			type : "post",
			url : appPath + "/member/findsubmit.html",
			data : {
				loginname : $("#loginname").val(),
				passwd : $.md5($("#passwd").val() + $("#key1").val()),
				key1 : $("#key1").val()
			},
			success : function(result) {
				$.hideLoading();
				$.alert(result.msg, function() {
					if (result.code == '1') {
						window.location = appPath + "/member/login.html";
					}
				});
			},
			error: function(XMLHttpRequest, textStatus, errorThrown) {
				$.hideLoading();
	            $.alert("系统异常，请稍后再试");
	        }
		});
	});
})